const express = require('express');
const router = express.Router();
router.get('/forCurrentUser', (req, res) => {
    const partStocks = [];
    for(let i = 0; i < 100; i++)
        partStocks.push({
            id: `${i}`,
            marketDepartmentName: '大区1',
            country: '中国',
            dealerCode: 'dealerCode1',
            dealerName: '总代1',
            partCode: 'partCode',
            partName: '配件名称1',
            partCodeLocal: 'partCodeLocal1',
            partNameLocal: '配件本地名称1',
            year: '2019',
            month: '5',
            partInQuantity: 10,
            partOutQuantity: 11,
            stockQuantity: 12,
            purchaseCurrency: 'CNY',
            purchasePrice: 500,
            saleCurrency: 'CNY',
            salePrice: 1000,
            updateTime: '2019-09-06',
            saveTime: '2019-09-06',
            status: 1,
            rowVersion: 'A111111111111'
        });
    res.json({
        message: '',
        payload: {
            content: partStocks,
            totalElements: partStocks.length,
        }
    });
});

router.post('/import', (req, res) => {
    res.json({
        message: '上传成功'
    });
});

router.get('/export/forCurrentUser', (req, res) => {
    res.json({
        message: 'success',
        payload: 'Mock导出'
    });
});
module.exports = router;
